Skip to content

Fix Astro syntax highlighting after css @property rules#16758

Open
mozgovoyslava wants to merge 2 commits into
withastro:mainfrom
mozgovoyslava:fix-css-property-atrule-highlighting
Open

Fix Astro syntax highlighting after css @property rules#16758
mozgovoyslava wants to merge 2 commits into
withastro:mainfrom
mozgovoyslava:fix-css-property-atrule-highlighting

Conversation

@mozgovoyslava
Copy link
Copy Markdown

Changes

  • Handles CSS @property rules inside Astro <style> blocks before delegating to VS Code's generic CSS grammar.
  • Prevents the tokenizer from staying in CSS context after </style>, so following <style> and <script> blocks keep correct highlighting.

Testing

  • Adds a grammar fixture covering @property descriptors followed by additional style and script blocks.
  • Adds a snapshot assertion that the closing style tags and following script block keep Astro scopes.

Docs

  • No docs update needed because this fixes editor syntax highlighting behavior only.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

🦋 Changeset detected

Latest commit: 35a4777

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
astro-vscode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant